---
title: Datetime field
summary: The datetime field stores a Datetime string.
---
{% field-demo field="datetime" /%}

The `datetime` field stores a Datetime string, collected from an `<input type="datetime-local" />` form field.

## Usage example

```typescript
datetime: fields.datetime({ 
  label: 'Event date and time',
  description: 'The date and time of the event'
})
```

## Type signature

Find the latest version of this field's type signature at: [https://docsmill.dev/npm/@keystatic/core@latest#/.fields.datetime](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.datetime)
